package com.dlc.shop.combo.multishop.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 套餐
 *
 * @author LGH
 * @date 2021-11-02 10:32:48
 */
@Data
@TableName("tz_combo")
public class Combo implements Serializable{
    private static final long serialVersionUID = 1L;

    @TableId
    @Schema(description = "套餐id" )
    private Long comboId;

    @Schema(description = "套餐名称" )
    @NotBlank(message = "套餐名称不能为空")
    private String name;

    @Schema(description = "创建时间" )
    private Date createTime;

    @Schema(description = "更新时间" )
    private Date updateTime;

    @Schema(description = "活动开始时间" )
    @NotNull(message = "活动开始时间不能为空")
    private Date startTime;

    @Schema(description = "活动结束时间" )
    @NotNull(message = "活动结束时间不能为空")
    private Date endTime;

    @Schema(description = "状态， -1：已删除 0：已失效 1：开启" )
    private Integer status;

    @Schema(description = "销量" )
    private Integer soldNum;

    @Schema(description = "套餐价格" )
    private Double price;

    @Schema(description = "店铺id" )
    private Long shopId;

    @Schema(description = "主商品id" )
    private Long mainProdId;

    @Schema(description = "主商品" )
    @Valid
    @TableField(exist = false)
    private ComboProd mainProd;

    @Schema(description = "搭配商品列表" )
    @Valid
    @TableField(exist = false)
    private List<ComboProd> matchingProds;

    @Schema(description = "商品数量" )
    @TableField(exist = false)
    private Integer prodCount;

    @Schema(description = "套餐价" )
    @TableField(exist = false)
    private Double matchingPrice;

    @Schema(description = "主商品名称" )
    @TableField(exist = false)
    private String mainProdName;

    @Schema(description = "主商品图片" )
    @TableField(exist = false)
    private String mainProdPic;

    @Schema(description = "搭配商品名称" )
    @TableField(exist = false)
    private String matchProdName;

    @Schema(description = "语言" )
    @TableField(exist = false)
    private Integer lang;

    @Schema(description = "主商品id列表" )
    @TableField(exist = false)
    private List<Long> mainProdIdList;

    @Schema(description = "搭配商品id列表" )
    @TableField(exist = false)
    private List<Long> matchProdIdList;
}
